package com.jh.readme.iu.fragment.picturelist;

import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import com.jh.readme.R;
import com.jh.tools.base.BaseFragment;
import com.jh.tools.bean.SinaPhotoList;

import java.util.List;

/**
 * 图片列表页
 */
public class PictureListFragment extends BaseFragment<PictureListPresenter,PictureListModel> implements PictureListContract.View {
    protected static final String NEWS_ID = "PictureList_id";
    protected static final String NEWS_TYPE = "PictureList_type";
    protected static final String POSITION = "position";
    private static final String news_title="title_PictureList";
    RecyclerView mRecyclerView;
    @Override
    public int getLayoutId() {
        return R.layout.fragment_picture_list;
    }
    public static PictureListFragment newInstance(String newsId, String newsType, int position) {
        PictureListFragment fragment = new PictureListFragment();
        Bundle bundle = new Bundle();
        bundle.putString(NEWS_ID, newsId);
        bundle.putString(NEWS_TYPE, newsType);
        bundle.putInt(POSITION, position);
        fragment.setArguments(bundle);
        return fragment;
    }
    public static PictureListFragment newInstance(String title,String newsId,String newsType, int position) {
        PictureListFragment fragment = new PictureListFragment();
        Bundle bundle = new Bundle();
        bundle.putString(NEWS_ID, newsId);
        bundle.putString(NEWS_TYPE, newsType);
        bundle.putString(news_title,title);
        bundle.putInt(POSITION, position);
        fragment.setArguments(bundle);
        return fragment;
    }
    @Override
    public void initView(View baseView) {
        mRecyclerView=(RecyclerView) baseView.findViewById(R.id.img_rlview);
    }

    @Override
    public void initPresenter() {
      mPresenter.setVM(this,mModel,this);
    }

    @Override
    public void initView(List<SinaPhotoList> sinaPhotoLists) {

    }
}
